package xiaomo.example.accountcore.controller;


import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import xiaomo.example.accountapi.amount.bo.AmountDecreaseBo;

@Api(tags = "金额")
@Slf4j
@RestController
@RequestMapping("amount")
public class AmountController {

    @ApiOperation("扣减")
    @PostMapping("decrease")
    public void decrease(@RequestBody AmountDecreaseBo amountDecreaseBO) {
        // 扣减金额
        log.info("账户服务：扣减用户{}金额{}元",
                amountDecreaseBO.getUserId(),
                amountDecreaseBO.getAmount());
    }
}
